package ua.khpi.si.kit49.diploma.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import ua.khpi.si.kit49.diploma.db.dao.RoadPriorityDAO;
import ua.khpi.si.kit49.diploma.db.dto.RoadPriority;

/**
 * Implementation of road priority
 * 
 * @author netstalk3r
 * 
 */

@Service("roadPriorityService")
public class RoadPriorityServiceImpl implements RoadPriorityService {

	public RoadPriorityServiceImpl() {
		super();
	}

	@Autowired(required = true)
	private RoadPriorityDAO roadPriorityDAO;

	@Override
	@Transactional(propagation = Propagation.REQUIRED, readOnly = true)
	public RoadPriority getRoadPriorityById(Integer id) {
		return roadPriorityDAO.getRoadPriorityById(id);
	}

}
